Skip to content

[Payment due @ikevin127] Add a sortable Rejected column to Search - #104566

Merged
JS00001 merged 5 commits into
Expensify:mainfrom
c3024:chaitanya/685831-rejected-column
Oct 28, 2026
Merged

JS00001 merged 5 commits into
Expensify:mainfrom
c3024:chaitanya/685831-rejected-column

Conversation

@c3024

@c3024 c3024 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Adds an optional Rejected column to Spend > Expenses and Spend > Reports, next to the declined: filter from #103309. It shows Yes or No like Billable, can be sorted by, and is included in Export > Current view with the same "Rejected" label as the filter.

The column key is declined. When it is shown or sorted by, the backend returns a boolean declined on each expense and expense report, and the export adds a declined column. That backend change is https://github.com/Expensify/Auth/pull/25720, which is deployed.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/685831
PROPOSAL:

Tests

  1. As a submitter on a workspace with approvals, submit three reports to an approver.
  2. As the approver, reject one expense on the first report.
  3. As the approver, reject the whole second report.
  4. As the submitter, go to Spend > Expenses and open the column picker.
  5. Verify Rejected is listed and is not selected by default.
  6. Select Rejected and save.
  7. Verify the Rejected column shows Yes for the rejected expense and No for the others.
  8. Click the Rejected column header.
  9. Verify the rejected expense moves to the top, then to the bottom when the header is clicked again.
  10. Click Export > Current view and open the file.
  11. Verify it has a Rejected column with Yes for the rejected expense and No for the others.
  12. Go to Spend > Reports, open the column picker, select Rejected and save.
  13. Verify the Rejected column shows Yes for the second report and No for the first and third reports.
  14. Click the Rejected column header.
  15. Verify the second report moves to the top, then to the bottom when the header is clicked again.
  16. Click Export > Current view and open the file.
  17. Verify it has a Rejected column with Yes for the second report and No for the others.
  • Verify that no errors appear in the JS console

Offline tests

  1. Show the Rejected column on Spend > Expenses while online.
  2. Go offline.
  3. Verify the Rejected column still shows the values that were loaded.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari 685831-col-12-offline 685831-col-10-reports-sort-2 685831-col-09-reports-sort-1 685831-col-08-reports-column 685831-col-06-export-menu 685831-col-05-expenses-sort-2 685831-col-04-expenses-sort-1 685831-col-03-expenses-column 685831-col-02-picker-selected

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/index.ts 95.90% <ø> (ø)
...omponents/Search/SearchList/ListItem/YesNoCell.tsx 100.00% <100.00%> (ø)
src/components/Search/SearchList/ListItem/types.ts 100.00% <ø> (ø)
src/components/Search/SearchTableHeader.tsx 48.35% <ø> (-0.57%) ⬇️
...ents/TransactionItemRow/TransactionItemRowWide.tsx 98.48% <100.00%> (ø)
src/libs/getTransactionFromTransactionListItem.ts 100.00% <ø> (ø)
src/styles/utils/index.ts 66.62% <100.00%> (+0.15%) ⬆️
src/components/Search/SortableTableHeader.tsx 45.83% <0.00%> (ø)
...ReportListItemRow/ExpenseReportListItemRowWide.tsx 0.00% <0.00%> (ø)
src/libs/SearchUIUtils.ts 74.47% <37.50%> (+0.72%) ⬆️
... and 898 files with indirect coverage changes

c3024 added 2 commits October 25, 2026 17:11
…cted-column

# Conflicts:
#	src/CONST/index.ts
#	src/components/Search/SearchTableHeader.tsx
#	src/components/Search/SortableTableHeader.tsx
#	src/components/TransactionItemRow/TransactionItemRowWide.tsx
#	src/libs/SearchUIUtils.ts
#	src/styles/utils/index.ts
#	tests/unit/Search/__snapshots__/ColumnAvailabilityTest.ts.snap
@c3024 c3024 changed the title [HOLD Auth 25720] Add a sortable Rejected column to Search Add a sortable Rejected column to Search Oct 25, 2026
@c3024
c3024 marked this pull request as ready for review October 26, 2026 07:44
@c3024
c3024 requested review from a team as code owners October 26, 2026 07:44
@melvin-bot
melvin-bot Bot requested review from ikevin127 and removed request for a team October 26, 2026 07:44
@melvin-bot

melvin-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

@ikevin127 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot requested review from dylanexpensify and removed request for a team October 26, 2026 07:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T03:13:38.881789Z 6dc80e1 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

/>
</View>
),
[CONST.SEARCH.TABLE_COLUMNS.DECLINED]: (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ CONSISTENCY-3 (docs)

This new DECLINED cell renders a Yes/No value with <View style={[getSearchColumnStyles(column)]}><Text selectable dataSet={COPYABLE_TEXT_DATA_SET}>{value ? translate('common.yes') : translate('common.no')}</Text></View>, which is the exact structure already implemented by the renderYesNoCell helper in TransactionItemRowWide.tsx (lines 183-195). Duplicating this across the two row components means a future change to the Yes/No cell (styling, copy, clipboard behavior) has to be made in two places and can drift.

Extract the Yes/No cell into a shared component (e.g. SearchList/ListItem/YesNoCell.tsx) and use it from both rows:

[CONST.SEARCH.TABLE_COLUMNS.DECLINED]: (
    <YesNoCell
        columnName={CONST.SEARCH.TABLE_COLUMNS.DECLINED}
        value={!!item.declined}
    />
),

and have TransactionItemRowWide.tsx's renderYesNoCell delegate to the same component.


Reviewed at: 73c2826 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the Yes/No cell into a shared YesNoCell component that both rows use, in 6131f51.

@ikevin127

ikevin127 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

iOS: Native
Screen.Recording.iPhone.18.Pro.10-26-2026.at.18.22.40.mp4
MacOS: Chrome / Safari
Screen.Recording.2026-10-26.at.18.05.27.mov

@ikevin127 ikevin127 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 LGTM - Only found 2 low-severity (🟢) comments. Won't block on them but should be addressed before merging 🙌

cc @c3024

Comment thread src/libs/SearchUIUtils.ts
Comment thread src/components/TransactionItemRow/types.ts
@melvin-bot
melvin-bot Bot requested a review from JS00001 October 27, 2026 01:23
@melvin-bot melvin-bot Bot changed the title Add a sortable Rejected column to Search [Payment due @ikevin127] Add a sortable Rejected column to Search Oct 27, 2026
@melvin-bot

melvin-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

🎯 @ikevin127, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/685831.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6dc80e11d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dylanexpensify dylanexpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good from product perspective 👍

Comment thread src/components/Search/SearchList/ListItem/YesNoCell.tsx
@c3024
c3024 requested a review from JS00001 October 28, 2026 03:59
@JS00001
JS00001 merged commit eb95958 into Expensify:main Oct 28, 2026
40 of 44 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.25-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed. This PR adds an optional Rejected column to an existing column picker, and it doesn't make any article sentence wrong.

Why
  • The Spend column list in Using Reports in New Expensify is a partial list ("You can choose from a wide range of columns, including:"). It already sends readers to Display > Edit columns for the full list.
  • The full list of in-report expense table columns in Managing Expenses in a Report is still accurate. The PR sets reportView: false for this column, so it doesn't appear in a report's column picker.
  • The export articles already say Current view matches the columns on the page, so they cover the new column.

view run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants